package com.yj.timecapsule.mapper;

import com.yj.timecapsule.entity.likes.Likes;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface LikesMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Likes record);

    int insertSelective(Likes record);

    Likes selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Likes record);

    int updateByPrimaryKey(Likes record);

    Long selectCountByDiariesId(@Param("diariesId") Long diariesId);

    List<Likes> selectByDiaryIds(@Param("diaryIds") List<Long> diaryIds);

    Likes selectByUserIdAndDiaryId(@Param("userId") Long currentId, @Param("diaryId") Long diaryId);

    void deleteByUserIdAndDiaryId(@Param("userId") Long currentId, @Param("diaryId")Long diaryId);

    List<Likes> selectByUserId(Long userId);
}